<?php

use yii\db\Schema;
use yii\db\Migration;

class m160411_094851_add_miaozhen_and_admaster_audience_dimensions extends Migration
{
    public function up()
    {
        $sql = <<<FINE
create table {{%audience_client}} (
  id int(10) unsigned not null auto_increment,
  title varchar(64) not null comment 'client name',
  name varchar(64) not null comment 'chinese name',
  last_update timestamp not null default current_timestamp on update current_timestamp,
  primary key (`id`)
) engine=innodb default charset=utf8;

insert into {{%audience_client}} (id, title, name) values 
(1, 'self audience', '自有人群'),
(2, 'miaozhen', '秒针人群'),
(3, 'admaster', 'Admaster人群');

alter table {{%audience_type}} add column audience_client int(10) not null default 1 comment '1 stands for self audience, 2 for miaozhen, 3 for admaster' after ad_network_id;
alter table {{%condition_audience}} add column audience_client_id int(10) not null default 1 comment '1 stands for self audience, 2 for miaozhen, 3 for admaster' after is_whitelist;
insert into {{%audience_type}} (id, ad_network_id, audience_client, parent_id, title) values
(409, 1, 2, 0, '年龄'),
(410, 1, 2, 409, '14-19'),
(411, 1, 2, 409, '20-24'),
(412, 1, 2, 409, '25-29'),
(413, 1, 2, 409, '30-34'),
(414, 1, 2, 409, '35-39'),
(415, 1, 2, 409, '40-44'),
(416, 1, 2, 409, '45-49'),
(417, 1, 2, 409, '其他年龄'),
(418, 1, 2, 0, '兴趣爱好'),
(419, 1, 2, 418, '母婴人群'),
(420, 1, 2, 418, '网购人群'),
(421, 1, 2, 418, '电商人群'),
(422, 1, 2, 418, '金融人群'),
(423, 1, 2, 418, '游戏人群'),
(424, 1, 2, 0, '性别'),
(425, 1, 2, 424, '全部'),
(426, 1, 2, 424, '男'),
(427, 1, 2, 424, '女'),
(428, 1, 3, 0, '人口属性'),
(429, 1, 3, 428, '性别'),
(430, 1, 3, 429, '全部'),
(431, 1, 3, 429, '男'),
(432, 1, 3, 429, '女'),
(433, 1, 3, 428, '年龄'),
(434, 1, 3, 433, '0-14'),
(435, 1, 3, 433, '15-19'),
(436, 1, 3, 433, '20-24'),
(437, 1, 3, 433, '25-29'),
(438, 1, 3, 433, '30-34'),
(439, 1, 3, 433, '35-39'),
(440, 1, 3, 433, '40-49'),
(441, 1, 3, 433, '50-54'),
(442, 1, 3, 433, '55-59'),
(443, 1, 3, 433, '60-64'),
(444, 1, 3, 433, '65+'),
(445, 1, 3, 428, '城市'),
(446, 1, 3, 445, '阿坝藏族羌族自治州'),
(447, 1, 3, 445, '阿克苏地区'),
(448, 1, 3, 445, '阿拉善盟'),
(449, 1, 3, 445, '阿勒泰地区'),
(450, 1, 3, 445, '阿里地区'),
(451, 1, 3, 445, '安康市'),
(452, 1, 3, 445, '安庆市'),
(453, 1, 3, 445, '安顺市'),
(454, 1, 3, 445, '安阳市'),
(455, 1, 3, 445, '鞍山市'),
(456, 1, 3, 445, '巴彦淖尔市'),
(457, 1, 3, 445, '巴音郭楞蒙古自治州'),
(458, 1, 3, 445, '巴中市'),
(459, 1, 3, 445, '白城市'),
(460, 1, 3, 445, '白山市'),
(461, 1, 3, 445, '白银市'),
(462, 1, 3, 445, '百色市'),
(463, 1, 3, 445, '蚌埠市'),
(464, 1, 3, 445, '包头市'),
(465, 1, 3, 445, '宝鸡市'),
(466, 1, 3, 445, '保定市'),
(467, 1, 3, 445, '保山市'),
(468, 1, 3, 445, '北海市'),
(469, 1, 3, 445, '本溪市'),
(470, 1, 3, 445, '毕节地区'),
(471, 1, 3, 445, '滨州市'),
(472, 1, 3, 445, '亳州市'),
(473, 1, 3, 445, '博尔塔拉蒙古自治州'),
(474, 1, 3, 445, '沧州市'),
(475, 1, 3, 445, '昌都地区'),
(476, 1, 3, 445, '昌吉回族自治州'),
(477, 1, 3, 445, '常德市'),
(478, 1, 3, 445, '常州市'),
(479, 1, 3, 445, '巢湖市'),
(480, 1, 3, 445, '朝阳市'),
(481, 1, 3, 445, '潮州市'),
(482, 1, 3, 445, '郴州市'),
(483, 1, 3, 445, '成都市'),
(484, 1, 3, 445, '承德市'),
(485, 1, 3, 445, '池州市'),
(486, 1, 3, 445, '赤峰市'),
(487, 1, 3, 445, '崇左市'),
(488, 1, 3, 445, '滁州市'),
(489, 1, 3, 445, '楚雄彝族自治州'),
(490, 1, 3, 445, '达州市'),
(491, 1, 3, 445, '大理白族自治州'),
(492, 1, 3, 445, '大连市'),
(493, 1, 3, 445, '大庆市'),
(494, 1, 3, 445, '大同市'),
(495, 1, 3, 445, '大兴安岭地区'),
(496, 1, 3, 445, '丹东市'),
(497, 1, 3, 445, '德宏傣族景颇族自治州'),
(498, 1, 3, 445, '德阳市'),
(499, 1, 3, 445, '德州市'),
(500, 1, 3, 445, '迪庆藏族自治州'),
(501, 1, 3, 445, '定西市'),
(502, 1, 3, 445, '东莞市'),
(503, 1, 3, 445, '东营市'),
(504, 1, 3, 445, '鄂尔多斯市'),
(505, 1, 3, 445, '鄂州市'),
(506, 1, 3, 445, '恩施土家族苗族自治州'),
(507, 1, 3, 445, '防城港市'),
(508, 1, 3, 445, '佛山市'),
(509, 1, 3, 445, '福州市'),
(510, 1, 3, 445, '抚顺市'),
(511, 1, 3, 445, '抚州市'),
(512, 1, 3, 445, '阜新市'),
(513, 1, 3, 445, '阜阳市'),
(514, 1, 3, 445, '甘南藏族自治州'),
(515, 1, 3, 445, '甘孜藏族自治州'),
(516, 1, 3, 445, '赣州市'),
(517, 1, 3, 445, '固原市'),
(518, 1, 3, 445, '广安市'),
(519, 1, 3, 445, '广元市'),
(520, 1, 3, 445, '广州市'),
(521, 1, 3, 445, '贵港市'),
(522, 1, 3, 445, '贵阳市'),
(523, 1, 3, 445, '桂林市'),
(524, 1, 3, 445, '果洛藏族自治州'),
(525, 1, 3, 445, '哈尔滨市'),
(526, 1, 3, 445, '哈密地区'),
(527, 1, 3, 445, '海北藏族自治州'),
(528, 1, 3, 445, '海东地区'),
(529, 1, 3, 445, '海口市'),
(530, 1, 3, 445, '海南藏族自治州'),
(531, 1, 3, 445, '海西蒙古族藏族自治州'),
(532, 1, 3, 445, '邯郸市'),
(533, 1, 3, 445, '汉中市'),
(534, 1, 3, 445, '杭州市'),
(535, 1, 3, 445, '合肥市'),
(536, 1, 3, 445, '和田地区'),
(537, 1, 3, 445, '河池市'),
(538, 1, 3, 445, '河源市'),
(539, 1, 3, 445, '菏泽市'),
(540, 1, 3, 445, '贺州市'),
(541, 1, 3, 445, '鹤壁市'),
(542, 1, 3, 445, '鹤岗市'),
(543, 1, 3, 445, '黑河市'),
(544, 1, 3, 445, '衡水市'),
(545, 1, 3, 445, '衡阳市'),
(546, 1, 3, 445, '红河哈尼族彝族自治州'),
(547, 1, 3, 445, '呼和浩特市'),
(548, 1, 3, 445, '呼伦贝尔市'),
(549, 1, 3, 445, '葫芦岛市'),
(550, 1, 3, 445, '湖州市'),
(551, 1, 3, 445, '怀化市'),
(552, 1, 3, 445, '淮安市'),
(553, 1, 3, 445, '淮北市'),
(554, 1, 3, 445, '淮南市'),
(555, 1, 3, 445, '黄冈市'),
(556, 1, 3, 445, '黄南藏族自治州'),
(557, 1, 3, 445, '黄山市'),
(558, 1, 3, 445, '黄石市'),
(559, 1, 3, 445, '惠州市'),
(560, 1, 3, 445, '鸡西市'),
(561, 1, 3, 445, '吉安市'),
(562, 1, 3, 445, '吉林市'),
(563, 1, 3, 445, '济南市'),
(564, 1, 3, 445, '济宁市'),
(565, 1, 3, 445, '佳木斯市'),
(566, 1, 3, 445, '嘉兴市'),
(567, 1, 3, 445, '嘉峪关市'),
(568, 1, 3, 445, '江门市'),
(569, 1, 3, 445, '焦作市'),
(570, 1, 3, 445, '揭阳市'),
(571, 1, 3, 445, '金昌市'),
(572, 1, 3, 445, '金华市'),
(573, 1, 3, 445, '锦州市'),
(574, 1, 3, 445, '晋城市'),
(575, 1, 3, 445, '晋中市'),
(576, 1, 3, 445, '荆门市'),
(577, 1, 3, 445, '荆州市'),
(578, 1, 3, 445, '景德镇市'),
(579, 1, 3, 445, '九江市'),
(580, 1, 3, 445, '酒泉市'),
(581, 1, 3, 445, '喀什地区'),
(582, 1, 3, 445, '开封市'),
(583, 1, 3, 445, '克拉玛依市'),
(584, 1, 3, 445, '克孜勒苏柯尔克孜自治州'),
(585, 1, 3, 445, '昆明市'),
(586, 1, 3, 445, '拉萨市'),
(587, 1, 3, 445, '来宾市'),
(588, 1, 3, 445, '莱芜市'),
(589, 1, 3, 445, '兰州市'),
(590, 1, 3, 445, '廊坊市'),
(591, 1, 3, 445, '乐山市'),
(592, 1, 3, 445, '丽江市'),
(593, 1, 3, 445, '丽水市'),
(594, 1, 3, 445, '连云港市'),
(595, 1, 3, 445, '凉山彝族自治州'),
(596, 1, 3, 445, '辽阳市'),
(597, 1, 3, 445, '辽源市'),
(598, 1, 3, 445, '聊城市'),
(599, 1, 3, 445, '林芝地区'),
(600, 1, 3, 445, '临沧市'),
(601, 1, 3, 445, '临汾市'),
(602, 1, 3, 445, '临夏回族自治州'),
(603, 1, 3, 445, '临沂市'),
(604, 1, 3, 445, '柳州市'),
(605, 1, 3, 445, '六安市'),
(606, 1, 3, 445, '六盘水市'),
(607, 1, 3, 445, '龙岩市'),
(608, 1, 3, 445, '陇南市'),
(609, 1, 3, 445, '娄底市'),
(610, 1, 3, 445, '泸州市'),
(611, 1, 3, 445, '洛阳市'),
(612, 1, 3, 445, '漯河市'),
(613, 1, 3, 445, '吕梁市'),
(614, 1, 3, 445, '马鞍山市'),
(615, 1, 3, 445, '茂名市'),
(616, 1, 3, 445, '眉山市'),
(617, 1, 3, 445, '梅州市'),
(618, 1, 3, 445, '绵阳市'),
(619, 1, 3, 445, '牡丹江市'),
(620, 1, 3, 445, '那曲地区'),
(621, 1, 3, 445, '南昌市'),
(622, 1, 3, 445, '南充市'),
(623, 1, 3, 445, '南京市'),
(624, 1, 3, 445, '南宁市'),
(625, 1, 3, 445, '南平市'),
(626, 1, 3, 445, '南通市'),
(627, 1, 3, 445, '南阳市'),
(628, 1, 3, 445, '内江市'),
(629, 1, 3, 445, '宁波市'),
(630, 1, 3, 445, '宁德市'),
(631, 1, 3, 445, '怒江傈僳族自治州'),
(632, 1, 3, 445, '攀枝花市'),
(633, 1, 3, 445, '盘锦市'),
(634, 1, 3, 445, '平顶山市'),
(635, 1, 3, 445, '平凉市'),
(636, 1, 3, 445, '萍乡市'),
(637, 1, 3, 445, '莆田市'),
(638, 1, 3, 445, '濮阳市'),
(639, 1, 3, 445, '普洱市'),
(640, 1, 3, 445, '七台河市'),
(641, 1, 3, 445, '齐齐哈尔市'),
(642, 1, 3, 445, '黔东南苗族侗族自治州'),
(643, 1, 3, 445, '黔南布依族苗族自治州'),
(644, 1, 3, 445, '黔西南布依族苗族自治州'),
(645, 1, 3, 445, '钦州市'),
(646, 1, 3, 445, '秦皇岛市'),
(647, 1, 3, 445, '青岛市'),
(648, 1, 3, 445, '清远市'),
(649, 1, 3, 445, '庆阳市'),
(650, 1, 3, 445, '衢州市'),
(651, 1, 3, 445, '曲靖市'),
(652, 1, 3, 445, '泉州市'),
(653, 1, 3, 445, '日喀则地区'),
(654, 1, 3, 445, '日照市'),
(655, 1, 3, 445, '三门峡市'),
(656, 1, 3, 445, '三明市'),
(657, 1, 3, 445, '三亚市'),
(658, 1, 3, 445, '厦门市'),
(659, 1, 3, 445, '山南地区'),
(660, 1, 3, 445, '汕头市'),
(661, 1, 3, 445, '汕尾市'),
(662, 1, 3, 445, '商洛市'),
(663, 1, 3, 445, '商丘市'),
(664, 1, 3, 445, '上饶市'),
(665, 1, 3, 445, '韶关市'),
(666, 1, 3, 445, '邵阳市'),
(667, 1, 3, 445, '绍兴市'),
(668, 1, 3, 445, '深圳市'),
(669, 1, 3, 445, '沈阳市'),
(670, 1, 3, 445, '省直辖县级行政区划'),
(671, 1, 3, 445, '省直辖县级行政区划'),
(672, 1, 3, 445, '省直辖县级行政区划'),
(673, 1, 3, 445, '十堰市'),
(674, 1, 3, 445, '石家庄市'),
(675, 1, 3, 445, '石嘴山市'),
(676, 1, 3, 445, '双鸭山市'),
(677, 1, 3, 445, '朔州市'),
(678, 1, 3, 445, '四平市'),
(679, 1, 3, 445, '松原市'),
(680, 1, 3, 445, '苏州市'),
(681, 1, 3, 445, '绥化市'),
(682, 1, 3, 445, '随州市'),
(683, 1, 3, 445, '遂宁市'),
(684, 1, 3, 445, '塔城地区'),
(685, 1, 3, 445, '台州市'),
(686, 1, 3, 445, '太原市'),
(687, 1, 3, 445, '泰安市'),
(688, 1, 3, 445, '泰州市'),
(689, 1, 3, 445, '唐山市'),
(690, 1, 3, 445, '天水市'),
(691, 1, 3, 445, '铁岭市'),
(692, 1, 3, 445, '通化市'),
(693, 1, 3, 445, '通辽市'),
(694, 1, 3, 445, '铜川市'),
(695, 1, 3, 445, '铜陵市'),
(696, 1, 3, 445, '铜仁地区'),
(697, 1, 3, 445, '吐鲁番地区'),
(698, 1, 3, 445, '威海市'),
(699, 1, 3, 445, '潍坊市'),
(700, 1, 3, 445, '渭南市'),
(701, 1, 3, 445, '温州市'),
(702, 1, 3, 445, '文山壮族苗族自治州'),
(703, 1, 3, 445, '乌海市'),
(704, 1, 3, 445, '乌兰察布市'),
(705, 1, 3, 445, '乌鲁木齐市'),
(706, 1, 3, 445, '无锡市'),
(707, 1, 3, 445, '芜湖市'),
(708, 1, 3, 445, '吴忠市'),
(709, 1, 3, 445, '梧州市'),
(710, 1, 3, 445, '武汉市'),
(711, 1, 3, 445, '武威市'),
(712, 1, 3, 445, '西安市'),
(713, 1, 3, 445, '西宁市'),
(714, 1, 3, 445, '西双版纳傣族自治州'),
(715, 1, 3, 445, '锡林郭勒盟'),
(716, 1, 3, 445, '咸宁市'),
(717, 1, 3, 445, '咸阳市'),
(718, 1, 3, 445, '湘潭市'),
(719, 1, 3, 445, '湘西土家族苗族自治州'),
(720, 1, 3, 445, '襄樊市'),
(721, 1, 3, 445, '孝感市'),
(722, 1, 3, 445, '忻州市'),
(723, 1, 3, 445, '新乡市'),
(724, 1, 3, 445, '新余市'),
(725, 1, 3, 445, '信阳市'),
(726, 1, 3, 445, '邢台市'),
(727, 1, 3, 445, '兴安盟'),
(728, 1, 3, 445, '宿迁市'),
(729, 1, 3, 445, '宿州市'),
(730, 1, 3, 445, '徐州市'),
(731, 1, 3, 445, '许昌市'),
(732, 1, 3, 445, '宣城市'),
(733, 1, 3, 445, '雅安市'),
(734, 1, 3, 445, '烟台市'),
(735, 1, 3, 445, '延安市'),
(736, 1, 3, 445, '延边朝鲜族自治州'),
(737, 1, 3, 445, '盐城市'),
(738, 1, 3, 445, '扬州市'),
(739, 1, 3, 445, '阳江市'),
(740, 1, 3, 445, '阳泉市'),
(741, 1, 3, 445, '伊春市'),
(742, 1, 3, 445, '伊犁哈萨克自治州'),
(743, 1, 3, 445, '宜宾市'),
(744, 1, 3, 445, '宜昌市'),
(745, 1, 3, 445, '宜春市'),
(746, 1, 3, 445, '益阳市'),
(747, 1, 3, 445, '银川市'),
(748, 1, 3, 445, '鹰潭市'),
(749, 1, 3, 445, '营口市'),
(750, 1, 3, 445, '永州市'),
(751, 1, 3, 445, '榆林市'),
(752, 1, 3, 445, '玉林市'),
(753, 1, 3, 445, '玉树藏族自治州'),
(754, 1, 3, 445, '玉溪市'),
(755, 1, 3, 445, '岳阳市'),
(756, 1, 3, 445, '云浮市'),
(757, 1, 3, 445, '运城市'),
(758, 1, 3, 445, '枣庄市'),
(759, 1, 3, 445, '湛江市'),
(760, 1, 3, 445, '张家界市'),
(761, 1, 3, 445, '张家口市'),
(762, 1, 3, 445, '张掖市'),
(763, 1, 3, 445, '漳州市'),
(764, 1, 3, 445, '长春市'),
(765, 1, 3, 445, '长沙市'),
(766, 1, 3, 445, '长治市'),
(767, 1, 3, 445, '昭通市'),
(768, 1, 3, 445, '肇庆市'),
(769, 1, 3, 445, '镇江市'),
(770, 1, 3, 445, '郑州市'),
(771, 1, 3, 445, '中山市'),
(772, 1, 3, 445, '中卫市'),
(773, 1, 3, 445, '舟山市'),
(774, 1, 3, 445, '周口市'),
(775, 1, 3, 445, '珠海市'),
(776, 1, 3, 445, '株洲市'),
(777, 1, 3, 445, '驻马店市'),
(778, 1, 3, 445, '资阳市'),
(779, 1, 3, 445, '淄博市'),
(780, 1, 3, 445, '自贡市'),
(781, 1, 3, 445, '自治区直辖县级行政区划'),
(782, 1, 3, 445, '遵义市'),
(783, 1, 3, 0, '媒体倾向'),
(784, 1, 3, 783, 'BBS'),
(785, 1, 3, 784, 'SNS'),
(786, 1, 3, 783, 'SNS'),
(787, 1, 3, 786, 'BBS'),
(788, 1, 3, 786, '其它'),
(789, 1, 3, 786, '微博'),
(790, 1, 3, 786, '社交'),
(791, 1, 3, 783, '其它'),
(792, 1, 3, 791, '其它'),
(793, 1, 3, 791, '测试'),
(794, 1, 3, 783, '垂直'),
(795, 1, 3, 794, 'IT科技'),
(796, 1, 3, 794, '体育'),
(797, 1, 3, 794, '其他'),
(798, 1, 3, 794, '其它'),
(799, 1, 3, 794, '军事'),
(800, 1, 3, 794, '医药'),
(801, 1, 3, 794, '女性'),
(802, 1, 3, 794, '文学'),
(803, 1, 3, 794, '旅游'),
(804, 1, 3, 794, '母婴'),
(805, 1, 3, 794, '汽车'),
(806, 1, 3, 794, '游戏'),
(807, 1, 3, 794, '生活'),
(808, 1, 3, 794, '财经'),
(809, 1, 3, 794, '音乐'),
(810, 1, 3, 783, '搜索'),
(811, 1, 3, 810, '搜索'),
(812, 1, 3, 783, '电商'),
(813, 1, 3, 812, 'B2B'),
(814, 1, 3, 812, 'B2C'),
(815, 1, 3, 812, 'C2C'),
(816, 1, 3, 812, 'O2O'),
(817, 1, 3, 783, '网盟'),
(818, 1, 3, 817, '垂直网盟'),
(819, 1, 3, 817, '移动网盟'),
(820, 1, 3, 817, '综合网盟'),
(821, 1, 3, 783, '视频'),
(822, 1, 3, 821, 'UGC'),
(823, 1, 3, 821, '客户端'),
(824, 1, 3, 821, '版权'),
(825, 1, 3, 821, '门户'),
(826, 1, 3, 783, '门户'),
(827, 1, 3, 826, '地方'),
(828, 1, 3, 826, '城市'),
(829, 1, 3, 826, '新闻'),
(830, 1, 3, 826, '综合'),
(831, 1, 3, 0, '行业倾向'),
(832, 1, 3, 831, '快速消费品'),
(833, 1, 3, 832, '食品'),
(834, 1, 3, 832, '家庭护理用品'),
(835, 1, 3, 832, '个人护理用品'),
(836, 1, 3, 832, '婴儿用品'),
(837, 1, 3, 832, '宠物用品'),
(838, 1, 3, 832, '其他'),
(839, 1, 3, 832, '水'),
(840, 1, 3, 832, '茶类/茶包/茶叶'),
(841, 1, 3, 832, '即饮咖啡/速溶咖啡/咖啡豆/奶茶'),
(842, 1, 3, 832, '碳酸饮料'),
(843, 1, 3, 832, '果蔬类'),
(844, 1, 3, 832, '运动健康/功能饮品'),
(845, 1, 3, 832, '粉状冲剂/浓缩液（非奶类）'),
(846, 1, 3, 832, '液态奶'),
(847, 1, 3, 832, '奶粉'),
(848, 1, 3, 832, '酸奶'),
(849, 1, 3, 831, '化妆品'),
(850, 1, 3, 849, '女性护肤品'),
(851, 1, 3, 849, '彩妆'),
(852, 1, 3, 849, '男性护肤品'),
(853, 1, 3, 849, '婴儿/儿童护理产品'),
(854, 1, 3, 849, '其他'),
(855, 1, 3, 831, '烟酒'),
(856, 1, 3, 855, '烟草'),
(857, 1, 3, 855, '洋酒'),
(858, 1, 3, 855, '红酒、白葡萄酒'),
(859, 1, 3, 855, '啤酒'),
(860, 1, 3, 855, '中国白酒'),
(861, 1, 3, 855, '其他'),
(862, 1, 3, 831, '汽车'),
(863, 1, 3, 862, '摩托车'),
(864, 1, 3, 862, '汽车配饰与服务'),
(865, 1, 3, 862, '其他'),
(866, 1, 3, 862, '豪华车/跑车'),
(867, 1, 3, 862, '越野车'),
(868, 1, 3, 862, '家用轿车'),
(869, 1, 3, 862, '客车'),
(870, 1, 3, 862, '工程车'),
(871, 1, 3, 831, '电器用品/家用电器'),
(872, 1, 3, 871, '音响、视频设备'),
(873, 1, 3, 871, '厨房电器'),
(874, 1, 3, 871, '办公电器'),
(875, 1, 3, 871, '其他'),
(876, 1, 3, 871, '黑电'),
(877, 1, 3, 871, '白电'),
(878, 1, 3, 871, '生活电器'),
(879, 1, 3, 871, '个护健康'),
(880, 1, 3, 831, '药品及健康产品/医疗药品及健康'),
(881, 1, 3, 880, '保健营养品'),
(882, 1, 3, 880, '健身设备'),
(883, 1, 3, 880, '健身服务'),
(884, 1, 3, 880, '其他'),
(885, 1, 3, 880, '药品'),
(886, 1, 3, 880, '美容产品'),
(887, 1, 3, 831, '服装及饰品'),
(888, 1, 3, 887, '时尚服装'),
(889, 1, 3, 887, '运动服饰与鞋帽'),
(890, 1, 3, 887, '鞋袜类'),
(891, 1, 3, 887, '袋/旅行箱/钱包'),
(892, 1, 3, 887, '眼镜'),
(893, 1, 3, 887, '手表-中低端'),
(894, 1, 3, 887, '配饰'),
(895, 1, 3, 887, '其他'),
(896, 1, 3, 887, '商务正装'),
(897, 1, 3, 887, '内衣'),
(898, 1, 3, 887, '童装'),
(899, 1, 3, 831, '运输/快递'),
(900, 1, 3, 899, '航空'),
(901, 1, 3, 899, '快递'),
(902, 1, 3, 899, '其他'),
(903, 1, 3, 899, '铁路'),
(904, 1, 3, 899, '公路'),
(905, 1, 3, 899, '海洋'),
(906, 1, 3, 831, '财务/投资/银行/金融服务'),
(907, 1, 3, 906, '银行'),
(908, 1, 3, 906, '财务/投资'),
(909, 1, 3, 906, '保险'),
(910, 1, 3, 906, '其他'),
(911, 1, 3, 831, '零售店'),
(912, 1, 3, 911, '时装店'),
(913, 1, 3, 911, '商超'),
(914, 1, 3, 911, '电器商城'),
(915, 1, 3, 911, '餐饮店'),
(916, 1, 3, 911, '其他'),
(917, 1, 3, 831, '奢侈品'),
(918, 1, 3, 917, '珠宝'),
(919, 1, 3, 917, '手表'),
(920, 1, 3, 917, '箱包皮具'),
(921, 1, 3, 917, '香水'),
(922, 1, 3, 917, '其他'),
(923, 1, 3, 831, '信息与通讯'),
(924, 1, 3, 923, '软件'),
(925, 1, 3, 923, '通讯网络'),
(926, 1, 3, 923, '讯通设备'),
(927, 1, 3, 923, '其他'),
(928, 1, 3, 831, '互联网科技'),
(929, 1, 3, 928, '电子商务'),
(930, 1, 3, 928, '互联网'),
(931, 1, 3, 928, '网络游戏'),
(932, 1, 3, 928, '其他'),
(933, 1, 3, 831, '政府/社会/公益'),
(934, 1, 3, 933, '教育及出国'),
(935, 1, 3, 933, '政府机构'),
(936, 1, 3, 933, '组织'),
(937, 1, 3, 933, '公益广告'),
(938, 1, 3, 933, '其他'),
(939, 1, 3, 831, '休闲娱乐'),
(940, 1, 3, 939, '旅游'),
(941, 1, 3, 939, '酒店'),
(942, 1, 3, 939, '演出活动'),
(943, 1, 3, 939, '生活服务'),
(944, 1, 3, 939, '其他'),
(945, 1, 3, 939, '婚庆'),
(946, 1, 3, 939, '彩票'),
(947, 1, 3, 831, '其它'),
(948, 1, 3, 947, '其他'),
(949, 1, 3, 947, '测试'),
(950, 1, 3, 947, '玩具'),
(951, 1, 3, 947, '乐器'),
(952, 1, 3, 947, '农产品'),
(953, 1, 3, 947, '工业'),
(954, 1, 3, 947, '化学化工'),
(955, 1, 3, 831, '消费电子'),
(956, 1, 3, 955, '摄影/摄像'),
(957, 1, 3, 955, '电脑'),
(958, 1, 3, 955, '电脑配件'),
(959, 1, 3, 955, '数码产品'),
(960, 1, 3, 955, '游戏机'),
(961, 1, 3, 955, '手机'),
(962, 1, 3, 955, '手机配件'),
(963, 1, 3, 955, '其他'),
(964, 1, 3, 831, '房地产'),
(965, 1, 3, 964, '商场'),
(966, 1, 3, 964, '住宅'),
(967, 1, 3, 964, '写字楼'),
(968, 1, 3, 964, '房产服务'),
(969, 1, 3, 964, '其他'),
(970, 1, 3, 831, '家具装饰'),
(971, 1, 3, 970, '家装建材'),
(972, 1, 3, 970, '家具'),
(973, 1, 3, 970, '家纺'),
(974, 1, 3, 970, '灯具'),
(975, 1, 3, 970, '厨卫'),
(976, 1, 3, 970, '日常用品'),
(977, 1, 3, 970, '其他'),
(978, 1, 3, 0, '技术设备'),
(979, 1, 3, 978, '浏览器'),
(980, 1, 3, 979, 'IE'),
(981, 1, 3, 979, 'Chrome'),
(982, 1, 3, 979, '360'),
(983, 1, 3, 979, 'Firefox'),
(984, 1, 3, 979, 'Safari'),
(985, 1, 3, 979, 'Opera'),
(986, 1, 3, 978, '操作系统'),
(987, 1, 3, 986, 'Windows'),
(988, 1, 3, 986, 'Mac'),
(989, 1, 3, 986, 'Android'),
(990, 1, 3, 986, 'Ios'),
(991, 1, 3, 986, 'Linux');
FINE;
        $this->execute($sql);
    }

    public function down()
    {
        $this->dropTable('{{%audience_client}}');
        $sql = <<<FINE
    delete from {{%audience_type}} where id between 991 and 409;
FINE;
        return $this->execute($sql); 
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
